home *** CD-ROM | disk | FTP | other *** search
PiXCL source | 1996-02-02 | 4.9 KB | 200 lines |
- {-----------------------------------------------------------------------
- Filename : checkVGA.pxl
- Purpose : Check current Windows driver parameters
- Date : v1.0 06 may 94
- Author : S.Dibbs, VYSOR Integration Inc
-
- ------------------------------------------------------------------------}
-
- Initialize:
- { Get the screen parameters and adjust the main window for a fixed size. }
-
- Set NewCaption$ = "Verify Windows Data"
- UseCoordinates(METRIC)
- WinGetActive(OldCaption$)
- WinTitle(OldCaption$,NewCaption$)
- WinLocate(NewCaption$,1,1,280,210, Res)
- UseBackground(TRANSPARENT,0,0,80) {Black}
- DrawBackground
-
- Restart:
- GetScreenCaps(HORZRES, X_res)
- GetScreenCaps(VERTRES, Y_res)
- GetScreenCaps(HORZSIZE, X_size)
- GetScreenCaps(VERTSIZE, Y_size)
- GetScreenCaps(NUMCOLORS,Colours)
- GetScreenCaps(BITSPIXEL,BitsPerPixel)
- GetScreenCaps(PLANES,BitPlanes)
-
- WaitInput(100)
- SetMenu("Exit!",Run_Leave,
- ENDPOPUP,
- " ",VGA,
- ENDPOPUP,
- " ",SVGA,
- ENDPOPUP,
- " ",WKS,
- ENDPOPUP,
- "Vert",IGNORE,
- "Red",Red,
- "Green",Green,
- "Blue",Blue,
- "Restart",Restart,
- ENDPOPUP,
- "Diag",Diag,
- ENDPOPUP,
- "About",About,
- ENDPOPUP)
-
- Display:
- Str(X_Res,X_Res$)
- Str(Y_Res,Y_Res$)
- Str(X_Size,X_Size$)
- Str(Y_Size,Y_Size$)
- Str(Colours,Colours$)
- Str(BitsPerPixel,BitsPerPixel$)
- Str(BitPlanes,BitPlanes$)
-
- Set Line1$ = "Screen Resolution is " + X_Res$
- Set Line1$ = Line1$ + " x "
- Set Line1$ = Line1$ + Y_Res$
- Set Line1$ = Line1$ + " pixels"
-
- Set Line2$ = "Screen Size is " + X_Size$
- Set Line2$ = Line2$ + " x "
- Set Line2$ = Line2$ + Y_Size$
- Set Line2$ = Line2$ + " millimeters"
-
- Set Line3$ = "Static Number of colours is " + Colours$
-
- Set Line4$ = "Bits per pixel is " + BitsPerPixel$
-
- Set Line5$ = "Number of Bitplanes is " + BitPlanes$
-
- UseFont("Arial",5,10,BOLD,NOITALIC,NOUNDERLINE,255,255,255)
- DrawText(20,20,Line1$)
- DrawText(20,30,Line2$)
- DrawText(20,40,Line3$)
- DrawText(20,50,Line4$)
- DrawText(20,60,Line5$)
-
- UseFont("Arial",4,8,BOLD,NOITALIC,NOUNDERLINE,255,255,0)
- If X_Res = 640 Then Set Line1$ = "Hence, your monitor is VGA compatible, and"
- If X_Res = 800 Then Set Line1$ = "Hence, your monitor is SVGA compatible, and"
- If X_Res = 1024 Then Set Line1$ = "Hence, your monitor is XGA compatible, and"
- If X_Res > 1024 Then Set Line1$ = "Hence, you have a high end PC, and "
-
- If Colours < 20 Then Set Line2$ = "you have an older PC or early model colour Laptop."
- If Colours = 20 Then Set Line2$ = "the number of available dynamic colours is 236."
- If Colours > 20 Then Set Line2$ = "you are probably running a hi-colour or 24 bit video card."
-
- Set Line3$ = "Number of Bitplanes is " + BitPlanes$
-
- DrawText(30,80,Line1$)
- DrawText(30,90,Line2$)
-
- If X_Res >= 1024 Then Goto Done
- Set Line3$ = "Concept! programs display best at higher"
- Set Line4$ = "resolutions. Please check if your video card"
- Set Line5$ = "and monitor supports either 800x600 or"
- Set Line6$ = "1024x768x256 colours. Setup this mode."
- DrawText(25,100,Line3$)
- DrawText(25,110,Line4$)
- DrawText(25,120,Line5$)
- DrawText(25,130,Line6$)
- {endif}
- Done:
-
- Wait_for_input:
- WaitInput()
-
-
-
- VGA:
- Set X_Res = 640
- Set Y_Res = 480
- DrawBackground Goto Display
- SVGA:
- Set X_Res = 800
- Set Y_Res = 600
- DrawBackground Goto Display
- WKS:
- Set X_Res = 1280
- Set Y_Res = 1024
- Set Colours = 4096
- DrawBackground Goto Display
-
-
-
- Red:
- UsePen(SOLID,1,255,0,0)
- Goto Vertical
- Green:
- UsePen(SOLID,1,0,255,0)
- Goto Vertical
- Blue:
- UsePen(SOLID,1,0,0,255)
- Vertical:
- GoSub Vertical_Drape
- Goto Wait_for_input
-
- Diag:
- GoSub Diag_Drape
- Goto Wait_for_input
-
- Run_Leave:
- End
-
-
- About:
- MessageBox(OK,1,INFORMATION,
- "Windows 3.1 application written and
- copyright ⌐ (1994) by
- VYSOR Integration Inc.
- Some portions copyright ⌐ (1992-1994)
- Leblond Group.
- All Rights Reserved.",
- "About Check VGA",Res)
- Goto Wait_for_Input
-
- {======================================================================}
- {Subroutine: }
- Vertical_Drape:
- UseCoordinates(PIXEL)
- Set X1 = 511 Set X2 = 512 Set X3 = 255 Set X4 = 768
- Set Y1 = 1 Set Y2 = 768
- Loop1:
- DrawLine(X1,1,X1,768)
- DrawLine(X2,1,X2,768)
- DrawLine(X3,1,X3,768)
- DrawLine(X4,1,X4,768)
- If X3 = 0 Then Set X3 = 1
- Set X1 = X1 - 1 Set X2 = X2 + 1
- Set X3 = X3 - 1 Set X4 = X4 + 1
- If X1 > 255 Then Goto Loop1
- UseCoordinates(METRIC)
-
- Return
-
- {Subroutine: }
- Diag_Drape:
- UsePen(SOLID,1,0,128,0)
- UseCoordinates(PIXEL)
- Set X1 = 522 Set X2 = 777 Set X3 = 256 Set X4 = 511
- Loop2:
- DrawLine(X1,1,X2,768)
- DrawLine(X3,1,X4,768)
- Set X1 = X1 + 1 Set X2 = X2 + 1
- Set X3 = X3 + 1 Set X4 = X4 + 1
- If X1 < 768 Then Goto Loop2
-
- Set X1 = 1 Set X2 = 255
- Loop3:
- DrawLine(X1,1,X2,768)
- Set X1 = X1 + 1 Set X2 = X2 + 1
- If X1 < 250 Then Goto Loop3
-
- UseCoordinates(METRIC)
-
- Return
-